The present invention relates to a method for estimating a disparity search range to which multi-level disparity image partition is applied, and a stereo image matching device in that a disparity histogram of a previous disparity image is analyzed at the time of stereo matching of a continuous image, the disparity image is divided into various sizes of image blocks, and a disparity search range is estimated on the basis of a disparity value having the number of pixels equal to or more than a predetermined threshold value for each image block, thereby decreasing a calculation amount while improving a stereo matching rate of the next frame.
Stereo matching is a technique of preparing two cameras different from each other at different positions, and obtaining 3-dimensional information from images obtained by imaging the same position at the same time. In this case, in the stereo matching, matching points corresponding to the same point in a reference image and a comparative image are found, and disparity information between two matching points is calculated, thereby obtaining a disparity image that is 3-dimensional distance information.
As stereo matching methods, there are feature-based matching and area-based matching.
The feature-based matching method is a method of finding feature points in the entire image, and performing matching of the feature points. In this case, the calculation speed is high, but the accuracy is low.
Meanwhile, in the area-based matching method, matching is performed for the entire image, thus a calculation speed is low, but accuracy is high.
In the area-based matching method, in order to supplement the disadvantage of a low calculation speed, a range to compare a correlation is designated when performing the stereo matching to decrease a calculation amount of the area-based matching method to decrease a calculation time. In this case, the designated range to compare a correlation is referred to as a disparity search range.
FIG. 1A and FIG. 1B are diagrams for explaining a procedure of performing a stereo matching process.
In FIG. 1A and FIG. 1B, assuming that a point of a comparative image having the coordinate value as that of a point P of a reference image is Q, a point corresponding to the point P is searched in a disparity search range (Z) having a predetermined size based on Q. In this case, a point having the highest correlation with the point P is referred to as P′, and a disparity D that is a distance difference between P′ and Q is calculated, thereby obtaining a disparity image that is 3-dimensional distance information.
The stereo matching method described above, a correlation between one point of a reference image and points in a disparity search range set to a predetermined size in a comparative image is calculated one by one to acquire a disparity, and thus a calculation amount of stereo matching is increased in proportion to a disparity search range.
Due to the reason, at the time of stereo matching of a continuous image, assuming that change in image between adjacent frames is not large, when the stereo matching is performed only in the range of the disparity extracted from the stereo matching of the previous frame, it is possible to reduce a calculation amount of stereo matching. In addition, when using a method of performing stereo matching in a disparity range of the previous frame in each of image blocks generated after dividing a disparity image into a fixed size, it is possible to further reduce a calculation amount of stereo matching.
However, in the method of estimating a fixed-division disparity search range described above, when the number of divided image blocks for a disparity image is set to be large considering a calculation amount, and when there is a lot of noises in an image block corresponding to a disparity search range or there is only a small size of object or a part of the object in an image block, it is determined as a noise component and is removed, and thus an error may occur in acquiring disparity information. Eventually, this is a factor of lowering accuracy of stereo matching.